package KnowSparkSQL.DSL.DatasetSort.LianXi;

import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.SparkSession;

public class CarSort {
    public static void main(String[] args) {
        SparkSession sparkSession = SparkSession.builder().appName(CarSort.class.getName()).master("local").getOrCreate();

        Dataset<Row> csv = sparkSession.read().csv("./data/trip.csv");
        Dataset<Row> expr = csv.selectExpr("_c0 as `1111`", "_c1", "_c2", "int(_c3)", "int(_c4)");
        expr.orderBy("_c3","_c4").show();
        csv.orderBy("_c3","_c4").show();


    }
}
